/**
 * 
 */
package com.bean;

import com.util.FieldUtil;
import com.util.SqlTypeUtil;

/**
 * @author Ltz
 */
public class TableParamBean {
	private String paramName;
	private String paramComment;
	private String paramType;

    /**
     * 返回java字段名,并且第一个字母大写
     *
     * @return
     */
    public String getJavaFieldNameUF() {
        return FieldUtil.upperFirstLetter(getJavaFieldName());
    }

    /**
     * 返回java字段
     * @return
     */
    public String getJavaFieldName() {
        return FieldUtil.underlineFilter(paramName);
    }

    /**
     * 获得基本类型,int,float
     * @return
     */

    public String getJavaType() {
        String typeLower = paramType.toLowerCase();
        return SqlTypeUtil.convertToJavaType(typeLower);
    }

    /**
     * 获得装箱类型,Integer,Float
     * @return
     */

    public String getJavaTypeBox(){
        String typeLower = paramType.toLowerCase();
        return SqlTypeUtil.convertToJavaBoxType(typeLower);
    }

    public String getMybatisJdbcType() {
        String typeLower = paramType.toLowerCase();
        return SqlTypeUtil.convertToMyBatisJdbcType(typeLower);
    }


	public String getParamName() {
		return paramName;
	}

	public void setParamName(String paramName) {
		this.paramName = paramName;
	}

	public String getParamComment() {
		return paramComment;
	}

	public void setParamComment(String paramComment) {
		this.paramComment = paramComment;
	}

	public String getParamType() {
		return paramType;
	}

	public void setParamType(String paramType) {
		this.paramType = paramType;
	}

}
